Skip to content

Keep PHP CI source and host controls read-only - #349

Merged
rmcdaniel merged 5 commits into
mainfrom
fix/sample-app-php-ci-readonly-source
Nov 17, 2026
Merged

rmcdaniel merged 5 commits into
mainfrom
fix/sample-app-php-ci-readonly-source

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

The PHP CI launcher currently exposes its checkout and host-wrapper state read-write to package/application processes. This source change mounts both trees read-only and grants writes only to named application data, caches, dependency directories and PHP scaffold data. Host Python/Rust source and host temporary command inputs retain read-only exposure; PHP uses its own temporary-data directory.

The existing app writes are preserved through specific vendor/cache/storage/.env mounts. Preview tests use disposable public-directory snapshots so their hot-file writes do not expose checkout scripts/assets. Data mount paths must be canonical, non-symlink paths with disjoint source/control roots. The setup script prepares the PHP temporary directory, and the existing TLS fixture uses that declared data location.

Both PHP minors, current caller commands, immutable image binding, credential/environment allowlist, CA/PHAR verification, fixed-APT build inputs and limits are retained. No workflow or shared admission-policy record changes are included.

Source checks: shell syntax, Python AST parsing, seven explicit command-construction contracts using fake Docker/Git commands, public-boundary, whitespace and changed-source credential/private-path scans pass. The contracts construct and inspect arguments in disposable fixture directories; no actual Docker object, PHP/Composer/package/application code or runtime probe ran.

Draft / source-only. Caller CI is skipped. The stopped container-boundary validation and marker replacement probes were not executed, retried, copied or wired into setup. Existing old WIP is retained separately. No package/app/installed/onboarding qualification, replacement caller admission, merge or publication is authorized by these checks or by source review. Those explicit stops and the frozen #339 candidate 2bf6f2a remain.

Refs #344. Independent Security source review passed for exact f069b118886f922e979d865d964ed5179b9bc3dc and this four-file defensive diff. The source review is complete. This PR remains frozen and draft because the existing execution/admission stop still applies. It does not close #344 or establish runtime acceptance.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Security source PASS for exact f069b11, scoped to the four-file stopped-path boundary repair. The repository root and wrapper state are mounted read-only; writable overlays are a closed list of application dependency/cache/storage/environment data, isolated PHP scaffold data and disposable public snapshots. The launcher refuses non-absolute/noncanonical/comma/newline paths, direct and intermediate symlinks, non-directory overlays and source/state containment before Docker; PHP TMPDIR no longer inherits host command-input storage. The wrapper, Git metadata, action verifier and trust inputs remain read-only, while Python/Rust scaffold roots are created but not exposed writable to PHP. The fake-Docker contracts cover the complete mount and environment sets without running a container.

This verdict authorizes no real container or application/TLS execution and does not lift the existing stop. It does not qualify the image, installed dependencies, onboarding candidate or held #344 operation; those gates remain separate.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Security/source review PASS for exact f069b118886f922e979d865d964ed5179b9bc3dc / tree f60156b184f31f88dc58f40cf9bef931e8ec9d6b.

The four-file change establishes the requested host/container boundary:

  • The complete checkout and wrapper state are mounted read-only. The only writable overlays are the closed Laravel/Composer/PHP data set: vendor, bootstrap cache, storage, PHPUnit cache, .env, the PHP scaffold, Composer home, the dedicated PHP temporary directory, and disposable public snapshots needed by the preview test.
  • Root/state and every writable directory must be absolute, canonical, comma/newline-free, non-symlink directories; source and state cannot contain one another. Environment files are separately limited to canonical regular non-symlink files.
  • Python and Rust scaffold directories are created on the host but receive no writable overlay. Ambient host TMPDIR is no longer forwarded; the container gets only TMPDIR=<state>/data/php-tmp.
  • The synthetic TLS fixture now creates its private material under that PHP-only temporary tree, while the CA/action/Git metadata mounts remain read-only and the existing environment allowlist remains closed.

I independently ran the exact-head fake-Docker/import-isolation suite (11/11), shell syntax, Python compilation, and git diff --check. The TLS module loads cleanly and retains its explicit real-image skip in this source-only environment.

This verdict does not authorize or claim a real container, package/app/TLS runtime, marker replacement, onboarding/activation, the frozen #338 candidate, or the stopped #344 operation. Those remain separate gates.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 17, 2026 16:20
@rmcdaniel

Copy link
Copy Markdown
Member Author

General, runtime evidence for this exact head f069b118. I dispatched ci.yml on the branch (run 44124778705); ready_for_review isn't one of the default PR triggers, so CI hadn't run on it.

  • All four PHP 8.4/8.5 app and microservice cells ran through the read-only launcher and got through setup and composer install. Each then failed only at the known locked Laravel advisory GHSA-63hm-g96r-2m2q, which Require patched Laravel releases in both Sample applications #346 fixes. No permission or writable-path failure occurred.
  • Central action policy preflight refused ci.yml:test:step-6 Composer requests lack the reviewed clean bootstrap and live verifier. The read-only runtime needs its own central binding, since the writable launcher admission was withdrawn in .github#389. I'm drafting that binding in .github.
    Plan: central binding → merge this → merge Require patched Laravel releases in both Sample applications #346 → main green.

rmcdaniel and others added 2 commits November 17, 2026 16:55
No content change; the tree equals reviewed f069b11.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The read-only launcher's PHP cells only fail on the Laravel advisory that
#346 fixes, and #346 cannot pass the central preflight without this
launcher. Land both reviewed heads together.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rmcdaniel

Copy link
Copy Markdown
Member Author

General: after central admission .github#408 merged, this PR's Central action policy preflight passes. The only remaining failure was the Target branch qualification aggregate, which failed because the PHP cells hit the locked Laravel advisory. #346 fixes that advisory but can't pass the preflight without this launcher, so I merged #346's reviewed head a45254bc into this branch (c4fa745a). Its six files are disjoint from the launcher change and merged without conflicts. I'll merge once checks are green and close #346 as included.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit a92f34f into main Nov 17, 2026
37 checks passed
rmcdaniel added a commit that referenced this pull request Nov 18, 2026
Merge main (read-only PHP CI launcher #349, patched Laravel floors #346)
into the saved tuple draft and resolve the conflicts by moving the shipped
examples to the current published releases:

- native Server 3.12.0, durableworkflow/server index
  sha256:33c7ec1d61dbbdf5c1c2248da609208bdaa8a0f8d25f3f016686c486fc7ed7f8
  (same index digest on ghcr.io)
- Workflow 2.29.0 (12687fbd), PHP SDK 3.19.0 (15e2daa5) and
  Waterline 2.18.1 (cfde350b) in both Laravel apps; SDK 3.19.0 in the
  PHP playground runtime
- Rust SDK 4.18.0 in the playground template and polyglot worker
- CLI 2.10.0 and Python SDK 2.17.2 in the canonical tuple

Main's Laravel 13.41.0 / 12.72.0 floors are kept. Waterline 2.18.1 ships
the same public assets as 2.18.0, so both bundled copies are unchanged.
The README points at the Server 3.12.0 upgrade/rollback notes and tells
existing checkouts to run the Workflow 2.29.0 application migrations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep PHP CI host launchers outside writable container mounts

1 participant